home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
prog
/
atari
/
m2
/
cat3src
/
cat
/
showimpo.i
< prev
next >
Wrap
Text File
|
1997-10-26
|
5KB
|
185 lines
IMPLEMENTATION MODULE showImport;
FROM SYSTEM IMPORT ADDRESS, CAST;
(* MM2 *)
IMPORT GrafBase;
(* CAT *)
FROM Void IMPORT v;
IMPORT WdwManager;
IMPORT MausTauschrsc;
IMPORT mtUtils;
IMPORT MagicAES;
IMPORT mtAppl;
VAR box : POINTER TO ARRAY[0..200] OF MagicAES.OBJECT;
VAR rect : GrafBase.Rectangle;
abs,
pos : LONGCARD;
inWindow: BOOLEAN;
wdwHandle: INTEGER;
PROCEDURE bProc (wdw, vdi : INTEGER; env : ADDRESS; mx, my : INTEGER; kstate, buts : BITSET; clicks :INTEGER): BOOLEAN;
BEGIN
RETURN FALSE;
END bProc;
PROCEDURE kProc (wdw, vdi : INTEGER; env: ADDRESS; taste: INTEGER; key, scan : CHAR; kstate : BITSET): BOOLEAN;
BEGIN
RETURN FALSE
END kProc;
PROCEDURE closeP (wdw, vdi: INTEGER; env : ADDRESS; force : BOOLEAN): BOOLEAN;
BEGIN
RETURN force
END closeP;
PROCEDURE topP (wdw, vdi: INTEGER; env: ADDRESS): BOOLEAN;
BEGIN
RETURN TRUE
END topP;
PROCEDURE untopP (wdw, vdi: INTEGER; env: ADDRESS);
END untopP;
PROCEDURE setWork (wdw, vdi: INTEGER; env: ADDRESS; doc: GrafBase.LongRect; slided: BOOLEAN);
END setWork;
PROCEDURE getRect (wdw, vdi: INTEGER; env: ADDRESS; VAR r : GrafBase.Rectangle);
BEGIN
rect := r;
box^[0].obX := r.x;
box^[0].obY := r.y;
END getRect;
PROCEDURE redrawInfo (wdw, vdi : INTEGER; env : ADDRESS; clip : GrafBase.Rectangle);
BEGIN
MagicAES.ObjcDraw (env, 0, 8, clip);
END redrawInfo;
PROCEDURE updateP (wdw, vdi: INTEGER; env: ADDRESS; doIt: BOOLEAN);
BEGIN
IF doIt
THEN
MagicAES.WindUpdate (MagicAES.BEGUPDATE);
ELSE
MagicAES.WindUpdate (MagicAES.ENDUPDATE);
END;
END updateP;
PROCEDURE Open (absolute : LONGCARD);
VAR full : GrafBase.Rectangle;
comps: BITSET;
oldFrame: CHAR;
tmp : BITSET;
BEGIN
box := MausTauschrsc.TreeAddr^[MausTauschrsc.import];
box^[MausTauschrsc.fill].obWidth := 1;
abs := absolute;
pos := 0;
(* Jetzt Fllstil auf Solid und Farbe setzen, falls Farbe *)
IF mtAppl.Bitplanes > 1
THEN
tmp := box^[MausTauschrsc.fill].obSpec.Box.flags;
tmp := tmp - {0..6} + {4..6} + {1};
box^[MausTauschrsc.fill].obSpec.Box.flags := tmp;
END;
(* Outlined abschalten und Rand auf 1 Pixel setzen *)
mtUtils.ExclFlag (box, 0, MagicAES.OUTLINED);
oldFrame := box^[0].obSpec.Box.frame;
box^[0].obSpec.Box.frame := CAST(CHAR, -1);
MagicAES.FormCenter(box, rect);
mtUtils.ObjcArea (box, 0, rect);
(* Jetzt Fenster fr Box ffnen *)
comps := {MagicAES.NAME, MagicAES.MOVE};
MagicAES.WindCalc (MagicAES.WCBORDER, comps, rect, full);
IF full.y < WdwManager.deskSize.y THEN full.y := WdwManager.deskSize.y END;
IF full.x < WdwManager.deskSize.x THEN full.x := WdwManager.deskSize.x END;
IF WdwManager.OpenWindow (bProc, kProc, WdwManager.handleTimerProc (NIL),
full, full, comps,
FALSE, '', 'CAT', WdwManager.snapProc (NIL),
closeP, redrawInfo, topP,
untopP, updateP, setWork, getRect,
WdwManager.hideProc(NIL), 0, box,
TRUE, TRUE, FALSE, FALSE, wdwHandle, v.int)
THEN
inWindow := TRUE;
WdwManager.FullRedrawWdw (wdwHandle);
ELSE
inWindow := FALSE;
mtUtils.ExclFlag (box, 0, MagicAES.OUTLINED);
box^[0].obSpec.Box.frame := oldFrame;
MagicAES.WindUpdate (MagicAES.BEGUPDATE);
MagicAES.FormCenter(box, rect);
MagicAES.FormDial(MagicAES.FMDSTART, rect, rect);
MagicAES.ObjcDraw(box, 0, 5, rect);
END;
END Open;
(*
PROCEDURE Open(absolute : LONGCARD);
(* ffnet die Box *)
BEGIN
box := MausTauschrsc.TreeAddr^[MausTauschrsc.import];
box^[MausTauschrsc.fill].obWidth := 1;
abs := absolute;
pos := 0;
MagicAES.FormCenter(box, rect);
MagicAES.FormDial(MagicAES.FMDSTART, rect, rect);
MagicAES.ObjcDraw(box, 0, 5, rect);
END Open;
*)
PROCEDURE SetNew(newValue : LONGCARD);
(* Setzt neue Fllstandsanzeige *)
VAR rect : GrafBase.Rectangle;
oldW,
newW : INTEGER;
BEGIN
INC(pos, newValue);
oldW := box^[MausTauschrsc.fill].obWidth;
IF pos > abs THEN
pos := abs;
newW := box^[MausTauschrsc.afill].obWidth;
ELSE
newW := INTEGER( SHORT( ( LONG(CARDINAL(box^[MausTauschrsc.afill].obWidth)) * pos) DIV abs));
END;
IF (oldW # newW) & (newW > 0) THEN
box^[MausTauschrsc.fill].obWidth := newW;
WITH rect DO
x := box^[0].obX + box^[MausTauschrsc.afill].obX + oldW;
y := box^[0].obY + box^[MausTauschrsc.afill].obY;
w := newW - oldW + 1;
h := box^[MausTauschrsc.afill].obHeight;
END;
IF inWindow
THEN
WdwManager.RedrawWdw (wdwHandle, rect);
ELSE
MagicAES.ObjcDraw(box, MausTauschrsc.afill, 2, rect);
END;
END;
END SetNew;
PROCEDURE Close();
(* Schliet die Box wieder *)
BEGIN
IF inWindow
THEN
inWindow := FALSE;
v.bool := WdwManager.CloseWindow (wdwHandle, TRUE);
wdwHandle := -1;
ELSE
MagicAES.FormDial(MagicAES.FMDFINISH, rect, rect);
MagicAES.WindUpdate (MagicAES.ENDUPDATE);
END;
END Close;
BEGIN
wdwHandle := -1;
END showImport.